public static AlertDialog getHometownDialog(Context context, String title, DialogInterface.OnClickListener listener) {
        View view = View.inflate(context, R.layout.number_picker_three_dialog, null);
        AlertDialog dialog = new AlertDialog.Builder(context)
                .setTitle(title)
                .setView(view)
                .setPositiveButton(android.R.string.ok, listener)
                .setNegativeButton(android.R.string.cancel, null)
                .create();

        final NumberPicker np1 = (NumberPicker) view.findViewById(R.id.picker_number);
        final NumberPicker np2 = (NumberPicker) view.findViewById(R.id.picker_number_sec);
        final NumberPicker np3 = (NumberPicker) view.findViewById(R.id.picker_number_thd);
        final HashMap<String,JSONArray> cityMap = new HashMap<>();
        final HashMap<String, String[]> townMap = new HashMap<>();
        final List<String> cities = new ArrayList<>();
        np1.setMinValue(0);
        np2.setMinValue(0);
        np3.setMinValue(0);
        np1.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
            @Override
            public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
                JSONArray jsonArray = cityMap.get(cities.get(newVal));
                String[] array = new String[jsonArray.length()];
                for (int i = 0; i < jsonArray.length(); i++) {
                    try {
                        array[i] = jsonArray.getJSONObject(i).keys().next();
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
                np2.setDisplayedValues(null);
                np2.setMaxValue(array.length - 1);
                np2.setDisplayedValues(array);

                String[] towns = townMap.get(array[0]);
                np3.setDisplayedValues(null);
                np3.setMaxValue(towns.length - 1);
                np3.setDisplayedValues(towns);
            }
        });
        np2.setOnValueChangedListener(new NumberPicker.OnValueChangeListener() {
            @Override
            public void onValueChange(NumberPicker picker, int oldVal, int newVal) {
                String[] towns = townMap.get(picker.getDisplayedValues()[newVal]);
                np3.setDisplayedValues(null);
                np3.setMaxValue(towns.length - 1);
                np3.setDisplayedValues(towns);
            }
        });
        new AsyncTask<Void, Void, String>() {
            @Override
            protected String doInBackground(Void... params) {
                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                try {
                    byte buf[] = new byte[1024];
                    InputStream inputStream = FeelingApplication.getContext().getAssets().open("province");
                    int len;
                    while ((len = inputStream.read(buf)) != -1) {
                        outputStream.write(buf, 0, len);
                    }
                    outputStream.close();
                    inputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return outputStream.toString();
            }

            @Override
            protected void onPostExecute(String json) {
                super.onPostExecute(json);

                try {
                    JSONArray array = new JSONArray(json);
                    JSONArray tmpArray;
                    JSONObject obj;
                    for (int i = 0; i < array.length(); i++) {
                        obj = array.getJSONObject(i);
                        cities.add(obj.keys().next());
                        tmpArray = obj.getJSONArray(cities.get(i));
                        cityMap.put(cities.get(i), tmpArray);
                        for (int t = 0; t < tmpArray.length(); t++) {
                            Iterator<String> iterator = tmpArray.getJSONObject(t).keys();
                            while (iterator.hasNext()) {
                                String townKey = iterator.next();
                                JSONArray townArray = tmpArray.getJSONObject(t).getJSONArray(townKey);
                                String[] townArrays = new String[townArray.length()];
                                for (int ii = 0; ii < townArray.length(); ii++) {
                                    townArrays[ii] = townArray.getString(ii);
                                }
                                townMap.put(townKey, townArrays);
                            }
                        }
                    }
                    np1.setMaxValue(cities.size() - 1);
                    np1.setDisplayedValues(cities.toArray(new String[cities.size()]));

                    JSONArray jsonArray = cityMap.get(cities.get(0));
                    String[] np2Array = new String[jsonArray.length()];
                    for (int i = 0; i < jsonArray.length(); i++) {
                        try {
                            np2Array[i] = jsonArray.getJSONObject(i).keys().next();
                        } catch (JSONException e) {
                            e.printStackTrace();
                        }
                    }
                    np2.setValue(0);
                    np2.setDisplayedValues(np2Array);
                    np2.setMaxValue(np2Array.length - 1);

                    String[] towns = townMap.get(np2Array[0]);
                    np3.setValue(0);
                    np3.setDisplayedValues(towns);
                    np3.setMaxValue(towns.length - 1);
                } catch (JSONException e) {
                    e.printStackTrace();
                }
            }
        }.execute();


        np1.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
        np1.setWrapSelectorWheel(false);
        np2.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
        np2.setWrapSelectorWheel(false);
        np3.setDescendantFocusability(NumberPicker.FOCUS_BLOCK_DESCENDANTS);
        np3.setWrapSelectorWheel(false);
        return dialog;
    }